package com.neu.mianxiangduixiang;

import java.util.Scanner;

public class no1 {
    public static void main(String[] args) {
        System.out.println("输入判断是否为水仙花数");
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        boolean f = shuixian(x);
        if (f==true){
            System.out.println(x+"是水仙花数");
        }else {
            System.out.println(x+"不是水仙花数");

        }
    }
    public static boolean shuixian(int num){
        boolean flag = true;
        int x = num/100;
        int y = num%100/10;
        int z = num%10;
        if (x*x*x+y*y*y+z*z*z==num){

            return flag;

        }

        return false;
    }
}
